<%@ page language="java" import="java.util.*,java.sql.*,com.ruohi.util.dbutil.*,com.ruohi.util.common.*,com.ruohi.manage.*" pageEncoding="UTF-8"%><%
	String resDomain = Env.getInstance().getProperty("img_domain");
	Connection connection = null;
	DBHelper dbHelper = DBHelper.getInstance();
	Map model = new HashMap();
	Map categorys = new TreeMap();
	String tableName = "weixin_jingdian";
	String channelUUID = CommonString.getFormatPara(request.getParameter("channel_uuid"));
	Map adminInfo = (Map)session.getAttribute("adminInfo");
	try{
		connection = PoolManager.getConnection(DBType.getDBTypeByEnum("106013"));
		String id = CommonString.getFormatPara(request.getParameter("id"));
		if(null!=id&&!"".equals(id)){
			model = dbHelper.getMap(" select * from "+tableName+" where uuid = ? ",new Object [] {id} , connection);
		}
		if("".equals(channelUUID)&&null!=model){
			channelUUID = (String)model.get("channel_uuid");
		}
		
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title><%=Env.getInstance().getProperty("project_name") %></title>
	<link rel="stylesheet" type="text/css" href="/plugin/other/highslide/highslide.css" />
	<link href="/plugin/ui/ligerUI/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
	<link href="/plugin/ui/ligerUI/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
	<link href="/plugin/ui/ligerUI/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
	<link href="/backend/style/style.css" rel="stylesheet" type="text/css" />
	<script src="/plugin/jquery/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" charset="utf-8" src="/plugin/editor/ueditor/editor_config.js"></script>
	<script type="text/javascript" charset="utf-8" src="/plugin/editor/ueditor/editor_all_min.js"></script>
	<link rel="stylesheet" type="text/css" href="/plugin/editor/ueditor/themes/default/ueditor.css"/>
	</head>

	<body style="margin: 0;padding: 0;">
    <form name="theform" id="theform" action="/backend/action/crud.jsp?enumNo=106013">
      <div class="formDiv">
        <div class="group"> <span><img src="/plugin/ui/ligerUI/ligerUI/skins/icons/communication.gif" /></span> <span class="groupTitle">基础信息</span> </div>
        <div class="formLeft"><span style="color:#F00">* </span>景点关键字</div>
        <div class="formRight">
          <input type="text" style="width:200px;float:left;" dataType="Require" msg="请输入景点关键字" class="jr_text" name="zd_name" id="zd_name" value="<%=CommonString.getFormatPara(model.get("name")) %>" maxlength="50"/>
        </div>
	    <div style="clear:left;"></div>
	    <div id="type_url" style="display:none;">
    	<div class="formLeft">跳转到网页</div>
	    <div class="formRight">
	      <input type="text" class="jr_text" name="zd_url" id="zd_url" value="<%=CommonString.getFormatPara(model.get("url")) %>" maxlength="50"/>
	    </div>
	    </div>
	    <div style="clear:left;"></div>
	    <div class="formLeft">景点图片</div>
	    <div class="formRight" style="width:400px;">
	      <input type="text" style="width: 400px;float:left;" class="jr_text" name="zd_img" id="zd_img" value="<%=CommonString.getFormatPara(model.get("img")) %>" />
	    </div>
	    <div class="formRight" style="width: 100px;"> <a href="<%=CommonString.getFormatPara(model.get("img")) %>" id="a_img" onclick='return hs.expand(this)'><img src="/backend/images/yulan.gif" /></a> <span id="equi_img"></span> </div>
	    <div style="clear:left;"></div>
	    <div class="formLeft">景点介绍</div>
	    <div class="formRight" style="height:200px">
	      <textarea class="jr_textarea" style="height:200px" name="zd_intro" id="zd_intro" dataType='Limit' min="0" max="1000" msg='景点介绍不能超过1000字' ><%=CommonString.getFormatPara(model.get("intro")) %></textarea>
	    </div>
	    <div style="clear:left;"></div>
	    <div class="formLeft">景点线路</div>
	    <div class="formRight" style="height:100px">
	      <textarea class="jr_textarea" style="height:100px" name="zd_line" id="zd_line" dataType='Limit' min="0" max="1000" msg='景点线路不能超过1000字' ><%=CommonString.getFormatPara(model.get("line")) %></textarea>
	    </div>
	    <div style="clear:left;"></div>
	    
     </div>
      <input type="hidden" name="zd_order_no" id="zd_order_no" value="<%=CommonString.getFormatPara(model.get("order_no")) %>" />
      <input type="hidden" name="tableName" id="tableName" value="<%=tableName %>" />
      <input type="hidden" name="zd_id" id="zd_id" value="<%=CommonString.getFormatPara(model.get("id")) %>" />
      <input type="hidden" name="zd_channel_uuid" id="zd_channel_uuid" value="<%=channelUUID %>" />
      <input type="hidden" name="eventAfter" id="eventAfter" value="" />
    </form>
</body>
</html>
<script type="text/javascript" src="/plugin/jquery/jquery.form.js"></script>
<script src="/plugin/ui/ligerUI/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script src="/backend/scripts/common.js?tab" type="text/javascript"></script>
<script src="/plugin/validator/wofoshan/validator.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/plugin/other/highslide/highslide.min.js"></script>
<script type="text/javascript" src="<%=resDomain%>/plugin/upload/jr_upload.js"></script>
<script type="text/javascript">
	hs.graphicsDir = '/plugin/other/highslide/graphics/';
	hs.wrapperClassName = 'wide-border';
	
	jQuery("#equi_img").JrUpload({
		remotUrl : "<%=resDomain%>/upload.jsp",
		folder : "saygou" ,
		watermark:false,
		callback : "setEquiImg"
	});
	function setEquiImg(data){
		var imgUrl = "<%=resDomain%>"+data;
		jQuery("#a_img").attr("href",imgUrl);
		jQuery("#zd_img").val(imgUrl);
	}
	
	function doSub(){
		var rs = Validator.Validate(document.getElementById("theform"),1);
		if(rs){
			jQuery("#theform").ajaxSubmit({
					type : "POST",
					async : false ,
					success : function(data) {
						var rs = parseInt(jQuery.trim(data), 10);
						if (rs > 0) {
							jrSuccess("保存成功！");
							<%
							if("".equals(id)){
								%>
							window.location.reload();
								<%
							}
							%>
						} 
					}
				});
		}
	}
	



	function smallToBig(o,id){
		jQuery(o).attr("href",jQuery("#"+id).val());
		return hs.expand(o);
	}
	
	
	//上传广告1
	$(function(){
		hs.graphicsDir = '/plugin/other/highslide/graphics/';
		hs.wrapperClassName = 'wide-border';
		
		jQuery("#ad_img1").JrUpload({
			remotUrl : "<%=resDomain%>/upload.jsp",
			folder : "saygou" ,
			watermark:false,
			multi:false,
			isResize:false,
			callback : "setLeftProductImg1"
		});
	});
		
		function setLeftProductImg1(data){
		if(data != ""){
			$("#zd_ad_img1").val("<%=resDomain %>" + data);
			jQuery("#a_img").attr("href","<%=resDomain %>" + data);
			$("#img_upload_msg1").show();
			$("#img_upload_msg1").delay(3000).hide(0);
		}
	}


</script>
<%
	}catch(Exception e){
		e.printStackTrace();
	}finally{
		dbHelper.freeConnection(connection);
	}
%>